package aex.domain;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

/**
 * CommentArticle entity. @author MyEclipse Persistence Tools
 */

public class CommentArticle implements java.io.Serializable {

	// Fields

	private Integer caId;
	private CommentArticle commentArticle;
	private Puser puser;
	private Article article;
	private Timestamp caTime;
	private String caCount;
	private Set commentArticles = new HashSet(0);

	// Constructors

	/** default constructor */
	public CommentArticle() {
	}

	/** minimal constructor */
	public CommentArticle(Integer caId) {
		this.caId = caId;
	}

	/** full constructor */
	public CommentArticle(Integer caId, CommentArticle commentArticle,
			Puser puser, Article article, Timestamp caTime, String caCount,
			Set commentArticles) {
		this.caId = caId;
		this.commentArticle = commentArticle;
		this.puser = puser;
		this.article = article;
		this.caTime = caTime;
		this.caCount = caCount;
		this.commentArticles = commentArticles;
	}

	// Property accessors

	public Integer getCaId() {
		return this.caId;
	}

	public void setCaId(Integer caId) {
		this.caId = caId;
	}

	public CommentArticle getCommentArticle() {
		return this.commentArticle;
	}

	public void setCommentArticle(CommentArticle commentArticle) {
		this.commentArticle = commentArticle;
	}

	public Puser getPuser() {
		return this.puser;
	}

	public void setPuser(Puser puser) {
		this.puser = puser;
	}

	public Article getArticle() {
		return this.article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	public Timestamp getCaTime() {
		return this.caTime;
	}

	public void setCaTime(Timestamp caTime) {
		this.caTime = caTime;
	}

	public String getCaCount() {
		return this.caCount;
	}

	public void setCaCount(String caCount) {
		this.caCount = caCount;
	}

	public Set getCommentArticles() {
		return this.commentArticles;
	}

	public void setCommentArticles(Set commentArticles) {
		this.commentArticles = commentArticles;
	}

	public CommentArticle getTopComment() {

		return this.commentArticle == null ? this : this.commentArticle;
	}
}